package com.android.serialport;

import android.util.Log;

import com.android.serialport.itf.ParseDataListener;
import com.rfid.protocol.Instruction;

/**
 * @author Administrator
 * @date 2021/2/1
 */
public class InventoryCommand extends Instruction {
    private final ParseDataListener mInventoryListener;

    public InventoryCommand(ParseDataListener listener) {
        mInventoryListener = listener;
    }

    @Override
    public byte[] getCommand() {
        return new byte[]{(byte) 0xFE, 0x01};
    }

    @Override
    public void invoke(byte[] data) {
        Log.e("InventoryCommand", "data=" + bytesToHexString(data));
        mInventoryListener.onData("Inventory",data);
    }

}